package com.cqeec.gams.mapper;

import java.util.List;

import org.apache.ibatis.annotations.Param;

import com.cqeec.gams.entity.Role;

public interface RoleMapper {
	public long countAll();

	public long count(String name);

	public List<Role> findAll();

	public void insert(Role role);

	public void save(Role role);

	/**
	 * @param pageNumber
	 * @param pageSize
	 * @return
	 */
	public List<Role> selectPage(@Param("startRow") int startRow, @Param("pageSize") int pageSize);

	/**
	 * @param i
	 * @param pageSize
	 * @param name
	 * @return
	 */
	public List<Role> selectPageWitchCondation(@Param("startRow") int startRow, @Param("pageSize") int pageSize,
			@Param("name") String name);

	/**
	 * @param name
	 * @return
	 */
	public long countAllWithCondation(String name);

	public List<Role> page(@Param("startRow") int startRow, @Param("pageSize") int pageSize,
			@Param("name") String name);

	/**
	 * @param id
	 * @param checked
	 */
	public void changeDisabled(@Param("id") String id, @Param("checked") Boolean checked);

	/**
	 * @param id
	 */
	public void deleteById(String id);

	/**
	 * @param id
	 * @return
	 */
	public Role findById(String id);

	/**
	 * @param role
	 */
	public void update(Role role);
}
